# default makefile
all:eformula

clean:
	rm -f *.o

CXX := g++
CXXFLAGS := -O0 -g -Wall


TESTS := \
mainmodeltest.o \
realnumbertest.o \
linkedlisttest.o \
linkedlistelementtest.o \
formulatest.o \
doubletostringtest.o \
formulafactorytest.o \
stacktest.o \
realoperationstest.o \
inputtest.o \
realvaluechecktest.o \
evolutionelementtest.o \
evolutiontest.o

EVOLUTION := \
	evolution.o \
	input.o \
	evolutionelement.o \
	formula.o \
	formulafactory.o \
	formulaelement.o \
	inputiterator.o \
	inputelement.o \

OPERATIONS := realvariable.o \
	realplus.o \
	realminus.o \
	realmultiplication.o \
	realdivide.o \
	realpow.o \
	realoperation.o \
	realnumber.o

IO := readarguments.o

eformula: ../main.cpp $(TESTS) $(EVOLUTION) $(OPERATIONS) $(IO)
	$(CXX) $(CXXFLAGS) $(TESTS) $(EVOLUTION) $(OPERATIONS) $(IO) ../main.cpp -o eformula

mainmodeltest.o: ../model/tests/mainmodeltest.h ../model/tests/mainmodeltest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/mainmodeltest.cpp -o mainmodeltest.o

realnumbertest.o: ../model/tests/realnumbertest.h ../model/tests/realnumbertest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/realnumbertest.cpp -o realnumbertest.o

linkedlisttest.o: ../model/tests/linkedlisttest.h ../model/tests/linkedlisttest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/linkedlisttest.cpp -o linkedlisttest.o

linkedlistelementtest.o: ../model/tests/linkedlistelementtest.h ../model/tests/linkedlistelementtest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/linkedlistelementtest.cpp -o linkedlistelementtest.o

formulatest.o: ../model/tests/formulatest.h ../model/tests/formulatest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/formulatest.cpp -o formulatest.o

doubletostringtest.o: ../model/tests/doubletostringtest.h ../model/tests/doubletostringtest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/doubletostringtest.cpp -o doubletostringtest.o

formulafactorytest.o: ../model/tests/formulafactorytest.h ../model/tests/formulafactorytest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/formulafactorytest.cpp -o formulafactorytest.o

stacktest.o: ../model/tests/stacktest.h ../model/tests/stacktest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/stacktest.cpp -o stacktest.o

realoperationstest.o: ../model/tests/realoperationstest.h ../model/tests/realoperationstest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/realoperationstest.cpp -o realoperationstest.o

inputtest.o: ../model/tests/inputtest.h ../model/tests/inputtest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/inputtest.cpp -o inputtest.o

realvaluechecktest.o: ../model/tests/realvaluechecktest.h ../model/tests/realvaluechecktest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/realvaluechecktest.cpp -o realvaluechecktest.o

evolutionelementtest.o: ../model/tests/evolutionelementtest.h ../model/tests/evolutionelementtest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/evolutionelementtest.cpp -o evolutionelementtest.o

evolutiontest.o: ../model/tests/evolutiontest.h ../model/tests/evolutiontest.cpp
	$(CXX) $(CXXFLAGS) -c ../model/tests/evolutiontest.cpp -o evolutiontest.o

readarguments.o: ../model/util/readarguments.h ../model/util/readarguments.cpp
	$(CXX) $(CXXFLAGS) -c ../model/util/readarguments.cpp -o readarguments.o

evolution.o: ../model/evolution/evolution.h ../model/evolution/evolution.cpp
	$(CXX) $(CXXFLAGS) -c ../model/evolution/evolution.cpp -o evolution.o

linkedlist.o: ../model/util/linkedlist/linkedlist.h linkedlistelement.o
	$(CXX) $(CXXFLAGS) -c ../model/util/linkedlist/linkedlist.h -o linkedlist.o

linkedlistelement.o: ../model/util/linkedlist/linkedlistelement.h
	$(CXX) $(CXXFLAGS) -c ../model/util/linkedlist/linkedlistelement.h -o linkedlistelement.o

evolutionelement.o: ../model/evolution/evolutionelement.h ../model/evolution/evolutionelement.cpp
	$(CXX) $(CXXFLAGS) -c ../model/evolution/evolutionelement.cpp -o evolutionelement.o

input.o: ../model/input/input.h ../model/input/input.cpp
	$(CXX) $(CXXFLAGS) -c ../model/input/input.cpp -o input.o

formula.o: ../model/formula/formula.h ../model/formula/formula.cpp
	$(CXX) $(CXXFLAGS) -c ../model/formula/formula.cpp -o formula.o

formulafactory.o: ../model/formula/formulafactory.h ../model/formula/formulafactory.cpp
	$(CXX) $(CXXFLAGS) -c ../model/formula/formulafactory.cpp -o formulafactory.o

bubblesort.o: ../model/util/sort/bubblesort.h
	$(CXX) $(CXXFLAGS) -c ../model/util/sort/bubblesort.h -o bubblesort.o

formulaelement.o: ../model/formula/formulaelement.h ../model/formula/formulaelement.cpp
	$(CXX) $(CXXFLAGS) -c ../model/formula/formulaelement.cpp -o formulaelement.o

formulafactoryutil.o: ../model/formula/formulafactoryutil.h
	$(CXX) $(CXXFLAGS) -c ../model/formula/formulafactoryutil.h -o formulafactoryutil.o

stack.o: ../model/util/stack/stack.h
	$(CXX) $(CXXFLAGS) -c ../model/util/stack/stack.h -o stack.o

realvaluecheck.o: ../model/util/realvaluecheck.h
	$(CXX) $(CXXFLAGS) -c ../model/util/realvaluecheck.h -o realvaluecheck.o

realnumber.o: ../model/realnumber/realnumber.h ../model/realnumber/realnumber.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/realnumber.cpp -o realnumber.o

inputiterator.o: ../model/input/inputiterator.h ../model/input/inputiterator.cpp
	$(CXX) $(CXXFLAGS) -c ../model/input/inputiterator.cpp -o inputiterator.o

inputelement.o: ../model/input/inputelement.h ../model/input/inputelement.cpp
	$(CXX) $(CXXFLAGS) -c ../model/input/inputelement.cpp -o inputelement.o

doubletostring.o: ../model/util/doubletostring.h
	$(CXX) $(CXXFLAGS) -c ../model/util/doubletostring.h -o doubletostring.o

realvariable.o: ../model/realnumber/operations/realvariable.h ../model/realnumber/operations/realvariable.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realvariable.cpp -o realvariable.o

realplus.o: ../model/realnumber/operations/realplus.h ../model/realnumber/operations/realplus.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realplus.cpp -o realplus.o

realminus.o: ../model/realnumber/operations/realminus.h ../model/realnumber/operations/realminus.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realminus.cpp -o realminus.o

realmultiplication.o: ../model/realnumber/operations/realmultiplication.h ../model/realnumber/operations/realmultiplication.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realmultiplication.cpp -o realmultiplication.o

realdivide.o: ../model/realnumber/operations/realdivide.h ../model/realnumber/operations/realdivide.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realdivide.cpp -o realdivide.o

realpow.o: ../model/realnumber/operations/realpow.h ../model/realnumber/operations/realpow.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/operations/realpow.cpp -o realpow.o

realoperation.o: ../model/realnumber/realoperation.h ../model/realnumber/realoperation.cpp
	$(CXX) $(CXXFLAGS) -c ../model/realnumber/realoperation.cpp -o realoperation.o
